package com.fr.report.core.barcode.output;

import java.awt.Color;
import java.awt.Font;

public abstract class AbstractOutput
{
  protected final double barHeight;
  protected final boolean painting;
  protected final double scalar;
  protected final Font font;
  protected final Color backgroundColour;
  protected Color foregroundColour;
  private Color savedColour;
  private final double barWidth;

  protected AbstractOutput(Font paramFont, double paramDouble1, double paramDouble2, boolean paramBoolean, double paramDouble3, Color paramColor1, Color paramColor2)
  {
    this.barWidth = paramDouble1;
    this.barHeight = paramDouble2;
    this.painting = paramBoolean;
    this.scalar = paramDouble3;
    this.font = paramFont;
    this.foregroundColour = paramColor1;
    this.backgroundColour = paramColor2;
  }

  public void setupForBlankDrawing()
  {
    this.savedColour = this.foregroundColour;
    this.foregroundColour = this.backgroundColour;
  }

  public void teardownFromBlankDrawing()
  {
    this.foregroundColour = this.savedColour;
    this.savedColour = null;
  }

  public double getBarWidth()
  {
    return this.barWidth;
  }

  public double getBarHeight()
  {
    return this.barHeight;
  }

  public abstract void drawBar(int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean);

  public abstract void beginDraw(double paramDouble1, double paramDouble2);

  public abstract void endDraw();

  public abstract double drawText(String paramString, double paramDouble1, double paramDouble2, double paramDouble3);

  public Color getForegroundColour()
  {
    return this.foregroundColour;
  }

  public Color getBackgroundColour()
  {
    return this.backgroundColour;
  }
}